//////////////////////////////////////////////////////////////////////
//!\file FlacMetaDataManager.hpp
//!\brief Reads out Metadata from FLAC files.
//!\author timmsusa@googlemail.com
//////////////////////////////////////////////////////////////////////

#ifndef FLACMETADATAMANAGER_HPP
#define FLACMETADATAMANAGER_HPP

#include "Utils.hpp"
#include <QString>
#include <QVector>
#include <QFileInfo>
#include <QTextStream>
#include <FLAC++/metadata.h>
//#include <string>


class FlacMetadataManager: public Utils
{
public:
    FlacMetadataManager();
    const QHash< QString, int >& getMetaLut();
    bool isFlacValid(const QString& filepath);
    QString extractMd5(const QString &pathToTrack);
    QVector< QString > getMetaDataByFilePath(const QString& filePath);
    QString getTrackMd5ByPath(const QString& filePath);
    //void fileInfoToMetaData(QVector<QString> &metadataValues/*, bool isFile*/, const QString& filePath);


    // Hash and hash keys.
    QVector< QString > m_metadataKeys;
    QHash< QString, int > m_lut;
    QString m_fileHdrLabel;

    QString m_md5HdrLabel;
    QString m_chansHdrLabel;
    QString m_bpsHdrLabel;
    QString m_srateHdrLabel;
    QString m_numSamplesHdrLabel;
    QString m_minBSizeHdrLabel;
    QString m_maxBSizeHdrLabel;
    QString m_minFSizeHdrLabel;
    QString m_maxFSizeHdrLabel;
    QString m_encoderHdrLabel;
    QString m_invalidDataHdrLabel;
    QString m_picHdrLabel;
    QString m_cueHdrLabel;
    QString m_commentHdrLabel;
    QString m_numSeekpointsHdrLabel;
    QString m_seekpointsHdrLabel;

    void initMetadataKeys();
private:

};

#endif // FLACMETADATAMANAGER_HPP
